﻿using System.Collections.Generic;
using Models;

namespace Providers
{
    /// <summary>
    /// Interface to lists of saved databases
    /// </summary>
    public interface ISavedDatabasesProvider
    {
        /// <summary>
        /// Save a list of databases for later use
        /// </summary>
        /// <param name="listName">The name of the database list to save</param>
        /// <param name="databases">The list of databases to save</param>
        /// <param name="errorMsg">Any error message generated when trying to save the list</param>
        /// <returns>True if the list was saved</returns>
        bool SaveList(string listName, List<Database> databases, out string errorMsg);

        /// <summary>
        /// Load a list of databases
        /// </summary>
        /// <param name="listName">The name of the database list to load</param>
        /// <param name="errorMsg">Any error message generated when trying to load the list</param>
        /// <returns>A list of databases</returns>
        List<Database> LoadList(string listName, out string errorMsg);
    }
}
